import Vue from 'vue'
import App from './App.vue'
import router from "./router"
import ElementUI from "element-ui";
import "@/assets/css/index.css";
import "element-ui/lib/theme-chalk/index.css";
import highlight from 'highlight.js';
import LwFirewords from 'lw_firewords'

const lw_f = new LwFirewords(); //创建实例
lw_f.init(); //启动事件

Vue.use(ElementUI);
Vue.use(highlight);

Vue.config.productionTip = false

// 全局代码高亮指令
Vue.directive('highlight', (el) => {
  let blocks = el.querySelectorAll('pre code')
  blocks.forEach((block) => {
    highlight.highlightElement(block)
  })
})

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
